//
	

	/*******************控制弹出框的************************/
    function showPopup(mail) {//弹出层 
    	document.getElementById("zhezhao").style.display ='block';
    	document.getElementById("title").value ="";
    	document.getElementById("content").value ="";
    	
		var objDiv = document.getElementById("popDiv");
		    objDiv.style.display = "block";
			toUser=mail;
			console.log("fdsafdsafdsafdsa"+mail);
			objDiv.style.top = "100px";//设置弹出层距离上边界的距离 
			objDiv.style.left = "250px";//设置弹出层距离左边界的距离 
			objDiv.style.width = "450px";//设置弹出层的宽度 
			objDiv.style.height = "420px";//设置弹出层的高度 
			 
			//objDiv.style.visibility = "visible"; 
	} 
	function hidePopup() {//关闭层 
		document.getElementById("zhezhao").style.display ='none';
		var objDiv = document.getElementById("popDiv"); 
		//objDiv.style.visibility = "hidden";
		objDiv.style.display = "none";
		
	} 
	
	function Treatise(name,date,author,class_,press,bookNum,direction)
	{
		this.name=name;
		this.date=date;
		this.author=author;
		this.class_=class_;
		this.press=press;
		this.bookNum=bookNum;; 
		this.direction=direction;
	}
	
	
	

	
$(document).ready(function(){	
	var objDiv = document.getElementById("popDiv");  	
	var x,y,mouseD;
	/*发送邮件*/
 
		$("#sendEmail").click(function(){
			hidePopup();
			
			   
		    $.post("admin/SendNoteAction.action",
		    {
		      toUser:toUser,
		      title:$("#title").val(),
		      content:$("#content").val()
		    });
		  });
		
});



	
	/**************************控制弹出框的拖动****************************
	var isIE = document.all ? true : false;//判断浏览器类型 
	/*document.onMouseDown = function(evnt) {//当鼠标左键按下后执行此函数 
			var evnt = evnt ? evnt : event; 
			//if (evnt.button == (document.all ? 1 : 0)) { 
			mouseD = true;//mouseD为鼠标左键状态标志，为true时表示左键被按下 
		//} 
	} 
	
	

	document.getElementById("popDiv").onmousedown = function(evnt) { 
		console.log("我是姚俊"+toUser);
		mouseD = true;
		//objDrag = this;//objDrag为拖动的对象 
		var evnt = evnt ? evnt : event; 
		if (evnt.button == (document.all ? 1 : 0)) { 
			mx = evnt.clientX; 
			my = evnt.clientY;
			x = evnt.clientX; 
			y = evnt.clientY;
			console.log(mx + ':' + my);
			objDiv.style.left = objDiv.offsetLeft + "px"; 
			console.log(objDiv.offsetLeft)
			objDiv.style.top = objDiv.offsetTop + "px"; 
			if (isIE) { 
				objDiv.setCapture(); 
			//objDiv.filters.alpha.opacity = 50;//当鼠标按下后透明度改变 
			} else { 
				window.captureEvents(Event.MOUSEMOVE);//捕获鼠标拖动事件 
				//objDiv.style.opacity = 0.5;//当鼠标按下后透明度改变 
			} 
		} 
	}
	document.onmouseup = function() { 
		console.log("我是姚俊"+toUser);
		mouseD = false;//左键松开 
		objDrag = ""; 
		if (isIE) { 
			objDiv.releaseCapture(); 
		//objDiv.filters.alpha.opacity = 100;//当鼠标左键松开后透明度改变 
		} else { 
		window.releaseEvents(objDiv.MOUSEMOVE);//释放鼠标拖动事件 
		//objDiv.style.opacity = 1;//当鼠标左键松开后透明度改变 
		} 
	} 

	document.onmousemove = function(evnt) { 
		var evnt = evnt ? evnt : event; 
		console.log(mouseD);
		if (mouseD == true) { 
		var mrx = evnt.clientX - mx; 
		var mry = evnt.clientY - my; 
		objDiv.style.left = parseInt(objDiv.style.left) + mrx + "px"; 
		objDiv.style.top = parseInt(objDiv.style.top) + mry + "px"; 
		//console.log('1111'+parseInt(objDiv.style.left));
		mx = evnt.clientX; 
		my = evnt.clientY; 
	} 
	} 
	
});*/
	
	
	
		  
